/*
 * Copyright(c) 2020-2100 万达信息股份有限公司 版权所有
 * WONDERS INFORMATION CO., LTD. ALL RIGHTS RESERVED.
 */

package com.wondersgroup;

/**
 * 跟01是同一个意思
 * @author: huym
 * @version: 1.0
 * @date: 2020/12/9
 */
public class Mgr02 {

    private static final Mgr02 INSTANCE;

    private Mgr02(){}

    static {
        INSTANCE = new Mgr02();
    }

    public static Mgr02 getInstance(){
        return INSTANCE;
    }

    public void m(){
        System.out.println("m");
    }

    public static void main(String[] args){
        Mgr02 m1 = Mgr02.getInstance();
        Mgr02 m2 = Mgr02.getInstance();
        System.out.println(m1==m2);
    }

}